home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 373 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. From: Michael Cook <mcook@cognex.com>
  2. Message-ID: <r4spgksdmg.fsf@erawan.cognex.com>
  3. X-Original-Date: 09 Feb 1996 10:49:27 -0500
  4. Path: in1.uu.net!bounce-back
  5. Date: 10 Feb 96 08:50:14 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Return-Path: <daemon@meeker.UCAR.EDU>
  8. Newsgroups: comp.std.c++
  9. Subject: Re: #ifdef XXXX
  10. Organization: Cognex Corporation, Natick, Massachusetts
  11. References: <1996Feb1.092058.4745@iiasa.ac.at> <4fe1jt$scn@hermes.acs.unt.edu>
  12. X-Newsreader: September Gnus v0.35/Emacs 19.30
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBFAgUBMRxcWOEDnX0m9pzZAQFUSwF+MNms+Z5xEE5GDLXB0F0b3fgTlvXU2sPQ
  15.     qNMwJ1l7PtZBJhwmJH7//kFESDB9JH7C
  16.     =sie6
  17.  
  18. >>>>> "JRW" == John R Williams <johnw@jove.acs.unt.edu> writes:
  19.  
  20.  JRW> Also something I have often wished for was something like #warning
  21.  JRW> which would cause the compiler to emit a warning.
  22.  
  23. I'd like to see `#assert':
  24.  
  25.    #assert sizeof(int)==4
  26.  
  27. which would be like
  28.  
  29.    #if sizeof(int)!=4
  30.    #error
  31.    #endif
  32.  
  33. except that it would work.  That is, #assert would be a compiler directive,
  34. not a preprocessor directive, and so there would be no restrictions on the
  35. kinds of expressions.
  36.  
  37. Michael.
  38. ---
  39. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  40.   Contact address: std-c++-request@ncar.ucar.edu.  Moderation policy:
  41.   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
  42.